import { Pipe } from "@angular/core";

/**
 * 隐藏密码
 */
@Pipe({ name: 'hidePassword' })
export class HidePassword {
  transform(value: any) {
    if (!value) {
      return 'N/A';
    }

    return '*'.repeat(value.length > 6 ? 6 : value.langth);
  }
}